home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 4615 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  935 b 

  1. Path: news.clark.net!not-for-mail
  2. From: gusty@clark.net (Harlan Messinger)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Newbie question on syntax of pointer to const
  5. Date: 30 Jan 1996 17:20:16 GMT
  6. Organization: Clark Internet Services, Inc., Ellicott City, MD USA
  7. Message-ID: <4elk0g$bbv@clarknet.clark.net>
  8. References: <4ej9eg$lq6@agate.berkeley.edu> <00001a81+00009661@msn.com>
  9. NNTP-Posting-Host: explorer.clark.net
  10. Mime-Version: 1.0
  11. Content-Type: TEXT/PLAIN; charset=ISO-8859-1
  12. Content-Transfer-Encoding: 8bit
  13.  
  14. Meiyu Lin (CompuWord@msn.com) wrote:
  15. : (1)    const double *pc;    
  16. :       This is a pointer to a const object of type double.
  17. :       *pc = 3.14156  the pointer pc is allowed to change
  18. :        
  19. : (2)    double const *pc = 3.14156;
  20. :       This is the pointer is to be declared as constant
  21. :     Since pointer is as constant the value can't be changed.
  22. : Hope I am right.
  23.  
  24. You've got it half backwards. See my earlier response.
  25.